package com.allen.module_setting

import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction
import com.alibaba.android.arouter.facade.annotation.Route
import com.allen.common.BaseAct
import com.allen.module_setting.databinding.ModuleSettingActBinding


/**
 *  @Autor  lwl
 *  日期    2021/4/1
 *  目的
 */
@Route(path = SettingConstance.SETTING_INDEX)
class ModuleSettingAct : BaseAct<ModuleSettingActBinding, ModuleSettingVm>() {

    override fun getResId(): Int {
        return R.layout.module_setting_act
    }

    override fun initData() {
    }

    override fun initView() {
        var setFragment = ModuleSettingFrag()
        val fragmentManager: FragmentManager = supportFragmentManager
        val transaction: FragmentTransaction = fragmentManager.beginTransaction() // 开启一个事务

        transaction.replace(R.id.module_setting_container, setFragment)
        transaction.commit()
    }

    override fun initObserve() {
    }

    override fun bindingVM() {
    }

    override fun getBaseViewModelClass(): Class<ModuleSettingVm> {
        return ModuleSettingVm::class.java
    }

    override fun initEvent() {
    }
}